﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="GridView_AutoColumn.aspx.cs" Inherits="Web.BusinessInformation.Example.GridView_AutoColumn"  Theme="Default" %>
<%@ Register Assembly="DevExpress.Web.v15.2, Version=15.2.9.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" Namespace="DevExpress.Web" TagPrefix="dx" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function onFocuseRowChanged(s, e)
        {


        }

        function onClick(s, e) {
           alert(gvTest.selectedIndex);
        }

    </script>
</head>

<body>
    <form id="form1" runat="server">
     
     <br /> 
     <table><tr><td valign="top">
        <dx:ASPxPanel ID="ASPxPanel1" runat="server" Height="90%" Width="100%">
            <PanelCollection>
<dx:PanelContent runat="server" SupportsDisabledAttribute="True">
 <dx:ASPxGridView ID="gvTest" runat="server" Width="500px" AutoGenerateColumns="False" ClientInstanceName="gvTest"
                        Settings-ShowVerticalScrollBar="true" KeyFieldName="用户号"  SkinID="test2222"
                        ClientIDMode="AutoID" 
        OnFocusedRowChanged="gvTest_FocusedRowChanged"> 
                        <Columns>  
                            <dx:GridViewDataColumn FieldName="序号"   Width="20px" />
                                <dx:GridViewDataColumn FieldName="用户号"   Width="50px" />
                                    <dx:GridViewDataColumn FieldName="用户名"   Width="60px" />
                                        <dx:GridViewDataColumn FieldName="描述值"   Width="20px" />  
                        </Columns> 

<Settings ShowVerticalScrollBar="True"></Settings>
<Settings>
 
</Settings>
<SettingsPager Mode="ShowAllRecords"></SettingsPager>
    <SettingsBehavior AllowFocusedRow="True"  ColumnResizeMode="Control" />
    <ClientSideEvents FocusedRowChanged ="function(s,e){ onFocuseRowChanged(s,e);}"> 

    </ClientSideEvents>
                    </dx:ASPxGridView>
                </dx:PanelContent>
</PanelCollection>
        </dx:ASPxPanel> 
 </td><td valign="top">
<div>
    <table><tr><td><dx:ASPxButton ID="ASPxButton1" runat="server" Text="<<" EnableClientSideAPI="True" AutoPostBack="False">
        <ClientSideEvents Click="function(s,e){ onClick(s,e);}"></ClientSideEvents>
        </dx:ASPxButton></td><td><dx:ASPxButton ID="ASPxButton2" runat="server" Text="<">
        </dx:ASPxButton></td><td><dx:ASPxButton ID="ASPxButton3" runat="server" Text=">">
        </dx:ASPxButton></td><td>
        <dx:ASPxButton ID="ASPxButton4" runat="server" Text=">>">
        </dx:ASPxButton>
    </td></tr></table>
</div>
<div>序号：<dx:ASPxTextBox ID="txtXuHao" runat="server" EnableClientSideAPI="True" 
    Width="170px">
        
    </dx:ASPxTextBox>
    
    </div>
    <div>用户号：<dx:ASPxTextBox ID="txtYongHuH" runat="server"
    Width="170px">
    </dx:ASPxTextBox>
    
    </div>
    <div>用户名：<dx:ASPxTextBox ID="txtYongHuM" runat="server"
    Width="170px">
    </dx:ASPxTextBox>
    
    </div>
    <div>描述值：<dx:ASPxTextBox ID="txtMiaoShuZ" runat="server"
    Width="170px">
    </dx:ASPxTextBox>
    
    </div>
     </td></tr></table>
    </form>
   
</body>
</html>
